Integrand size = 17, antiderivative size = 410 \[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=-\frac {i 2^{-2-n} e^{-i (2 a+c n)-i (2 b+d n) x+i n (c+d x)} \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2} \left (-\frac {2 b}{d}-n\right ),-n,\frac {1}{2} \left (2-\frac {2 b}{d}-n\right ),e^{2 i (c+d x)}\right )}{2 b+d n}+\frac {i 2^{-2-n} e^{i (2 a-c n)+i (2 b-d n) x+i n (c+d x)} \left (1-e^{2 i c+2 i d x}\right )^{-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2} \left (\frac {2 b}{d}-n\right ),-n,\frac {1}{2} \left (2+\frac {2 b}{d}-n\right ),e^{2 i (c+d x)}\right )}{2 b-d n}+\frac {i 2^{-1-n} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \left (1-e^{2 i (c+d x)}\right )^{-n} \operatorname {Hypergeometric2F1}\left (-n,-\frac {n}{2},1-\frac {n}{2},e^{2 i (c+d x)}\right )}{d n} \]
-I*2^(-2-n)*exp(-I*(c*n+2*a)-I*(d*n+2*b)*x+I*n*(d*x+c))*(I/exp(I*(d*x+c))- I*exp(I*(d*x+c)))^n*hypergeom([-n, -b/d-1/2*n],[1-b/d-1/2*n],exp(2*I*(d*x+ c)))/((1-exp(2*I*c+2*I*d*x))^n)/(d*n+2*b)+I*2^(-2-n)*exp(I*(-c*n+2*a)+I*(- d*n+2*b)*x+I*n*(d*x+c))*(I/exp(I*(d*x+c))-I*exp(I*(d*x+c)))^n*hypergeom([- n, b/d-1/2*n],[1+b/d-1/2*n],exp(2*I*(d*x+c)))/((1-exp(2*I*c+2*I*d*x))^n)/( -d*n+2*b)+I*2^(-1-n)*(I/exp(I*(d*x+c))-I*exp(I*(d*x+c)))^n*hypergeom([-n, -1/2*n],[1-1/2*n],exp(2*I*(d*x+c)))/d/((1-exp(2*I*(d*x+c)))^n)/n
\[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=\int \sin ^2(a+b x) \sin ^n(c+d x) \, dx \]
Time = 1.16 (sec) , antiderivative size = 397, normalized size of antiderivative = 0.97, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {5064, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx\) |
\(\Big \downarrow \) 5064 |
\(\displaystyle 2^{-n-2} \int \left (-e^{-2 i a-2 i b x} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n-e^{2 i a+2 i b x} \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n+2 \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle 2^{-n-2} \left (-\frac {i \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \left (1-e^{2 i c+2 i d x}\right )^{-n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2} \left (-\frac {2 b}{d}-n\right ),-n,\frac {1}{2} \left (-\frac {2 b}{d}-n+2\right ),e^{2 i (c+d x)}\right ) \exp (-i (2 a+c n)-i x (2 b+d n)+i n (c+d x))}{2 b+d n}+\frac {i \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \left (1-e^{2 i c+2 i d x}\right )^{-n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2} \left (\frac {2 b}{d}-n\right ),-n,\frac {1}{2} \left (\frac {2 b}{d}-n+2\right ),e^{2 i (c+d x)}\right ) \exp (i (2 a-c n)+i x (2 b-d n)+i n (c+d x))}{2 b-d n}+\frac {2 i \left (i e^{-i (c+d x)}-i e^{i (c+d x)}\right )^n \left (1-e^{2 i (c+d x)}\right )^{-n} \operatorname {Hypergeometric2F1}\left (-n,-\frac {n}{2},1-\frac {n}{2},e^{2 i (c+d x)}\right )}{d n}\right )\) |
2^(-2 - n)*(((-I)*E^((-I)*(2*a + c*n) - I*(2*b + d*n)*x + I*n*(c + d*x))*( I/E^(I*(c + d*x)) - I*E^(I*(c + d*x)))^n*Hypergeometric2F1[((-2*b)/d - n)/ 2, -n, (2 - (2*b)/d - n)/2, E^((2*I)*(c + d*x))])/((1 - E^((2*I)*c + (2*I) *d*x))^n*(2*b + d*n)) + (I*E^(I*(2*a - c*n) + I*(2*b - d*n)*x + I*n*(c + d *x))*(I/E^(I*(c + d*x)) - I*E^(I*(c + d*x)))^n*Hypergeometric2F1[((2*b)/d - n)/2, -n, (2 + (2*b)/d - n)/2, E^((2*I)*(c + d*x))])/((1 - E^((2*I)*c + (2*I)*d*x))^n*(2*b - d*n)) + ((2*I)*(I/E^(I*(c + d*x)) - I*E^(I*(c + d*x)) )^n*Hypergeometric2F1[-n, -1/2*n, 1 - n/2, E^((2*I)*(c + d*x))])/(d*(1 - E ^((2*I)*(c + d*x)))^n*n))
3.3.1.3.1 Defintions of rubi rules used
Int[Sin[(a_.) + (b_.)*(x_)]^(p_.)*Sin[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Simp[1/2^(p + q) Int[ExpandIntegrand[(I/E^(I*(c + d*x)) - I*E^(I*(c + d*x)))^q, (I/E^(I*(a + b*x)) - I*E^(I*(a + b*x)))^p, x], x], x] /; FreeQ[{a , b, c, d, q}, x] && IGtQ[p, 0] && !IntegerQ[q]
\[\int \sin \left (x b +a \right )^{2} \sin \left (d x +c \right )^{n}d x\]
\[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=\int { \sin \left (d x + c\right )^{n} \sin \left (b x + a\right )^{2} \,d x } \]
Timed out. \[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=\text {Timed out} \]
\[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=\int { \sin \left (d x + c\right )^{n} \sin \left (b x + a\right )^{2} \,d x } \]
\[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=\int { \sin \left (d x + c\right )^{n} \sin \left (b x + a\right )^{2} \,d x } \]
Timed out. \[ \int \sin ^2(a+b x) \sin ^n(c+d x) \, dx=\int {\sin \left (a+b\,x\right )}^2\,{\sin \left (c+d\,x\right )}^n \,d x \]